<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFourRecordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('four_record', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('order_id')->comment('订单编号');
            $table->integer('patient_id')->comment('患者姓名');
            $table->integer('visit_id')->comment('就诊卡号');
            $table->integer('source_id')->comment('来源');
            $table->integer('business_type')->comment('业务类型');
            $table->string('pay_type')->default('')->comment('支付方式');
            $table->decimal('money')->comment('支付金额（元）');
            $table->tinyInteger('status')->comment('支付状态');
            $table->decimal('balance')->comment('卡内余额');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('four_record');
    }
}
